// ++++++++++++++++++++++++++++++++++++++++
// 《零基础Go语言算法实战》源码
// ++++++++++++++++++++++++++++++++++++++++
// Author:廖显东（ShirDon）
// Blog:https://www.shirdon.com/
// Gitee:https://gitee.com/shirdonl/goAlgorithms.git
// Buy link :https://item.jd.com/14101229.html
// ++++++++++++++++++++++++++++++++++++++++

package main

import (
	"fmt"
)

func calcFunc(index string, x, y int) int {
	ret := x + y
	fmt.Println(index, x, y, ret)
	return ret
}

func main() {
	x := 1
	y := 2
	defer calcFunc("1", x, calcFunc("10", x, y))
	x = 0
	defer calcFunc("2", x, calcFunc("20", x, y))
	y = 1
}

//$ go run interview1-33.go
//10 1 2 3
//20 0 2 2
//2 0 2 2
//1 1 3 4
